import { Column, Entity, Index, PrimaryGeneratedColumn } from "typeorm";

@Index("admin_id", ["adminId"], {})
@Entity("rrz_admin_log", { schema: "rrzcms" })
export class RrzAdminLog {
  @PrimaryGeneratedColumn({
    type: "bigint",
    name: "id",
    comment: "表id",
    unsigned: true,
  })
  id: string;

  @Column("int", {
    name: "admin_id",
    comment: "管理员id",
    default: () => "'-1'",
  })
  adminId: number;

  @Column("text", { name: "log_info", nullable: true, comment: "日志描述" })
  logInfo: string | null;

  @Column("varchar", {
    name: "log_ip",
    nullable: true,
    comment: "ip地址",
    length: 30,
  })
  logIp: string | null;

  @Column("varchar", {
    name: "log_url",
    nullable: true,
    comment: "url",
    length: 255,
  })
  logUrl: string | null;

  @Column("int", {
    name: "log_time",
    nullable: true,
    comment: "日志时间",
    default: () => "'0'",
  })
  logTime: number | null;
}
